/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __M2_MATERIAL_LOADER_H__
#define __M2_MATERIAL_LOADER_H__

#include <vector>

#include "OgreGpuProgram.h"
#include "OgreMaterial.h"

#include "OgreSubMesh.h"

#include "M2File.h"

namespace GNgine
{
	class M2MaterialLoader
	{
	public:
		M2MaterialLoader(Ogre::String group,M2File* m2File);
		/*
		*/
		Ogre::String loadBodyMaterial();
		Ogre::String loadHairMaterial();
	private:
		/*add tex to pass
		*/
		Ogre::TextureUnitState* addTextureUnit(Ogre::Pass* pass,Ogre::String texName);
	private:
		static int _count;//loaded material count
		M2File* _m2File;
		Ogre::String _group;
		
	};

}

#endif
